<template>
  <div id="Footer">
    <h1>我是Footer，我要使用Store中的数据</h1>
    <h4>Store中State的count为{{count1}}</h4>
    <div>
      <h2 style="color: rebeccapurple">获取电影列表</h2>
      <button @click="getMovieList">获取电影列表数据</button>
      <ul>
        <Li v-for="item in movieList" :key="item.albumId">{{item.albumName}}</Li>
      </ul>
    </div>
  </div>
</template>

<script>
import {mapState,mapActions} from "vuex";
export default {
  name: "Footer",
  computed:{
    ...mapState({
      count1:'count',
      movieList:'movieList'
    })
  },
  methods:{
    ...mapActions({
      getMovieList:'getMovieList'
    }),

  }
}
</script>

<style scoped>
#Footer{
  margin: 20px auto;
  width: 800px;
  background-color: yellow;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
</style>